#include <iostream>
#include <math.h>

using namespace std;

bool IsCP(int soCP)
{
	int cp = (int)sqrtf(soCP);
	if(cp * cp == soCP)
	{
		return true;
	}

	return false;
}


int main()
{
	int n = 0;
	int i = 0;
	cout<<"nhap mot so de tim ra cac so chinh phuong: ";
	cin>>n;
	while(i < n)
	{
		i++;
		if(IsCP(i) == true)
		{
			cout<<"so chinh phuong "<<i<<endl;
		}
	}
	system("pause");
}


